package com.xujl.mvcbind.ui.statusbar.model;

import android.graphics.Color;

import com.xujl.fastlib.base.BaseModel;
import com.xujl.fastlib.base.IControl;

import java.util.Random;


/**
 * <pre>
 *     author : xujl
 *     e-mail : 597355068@qq.com
 *     time   : 2019/08/20
 *     desc   :
 *     version: 1.0
 * </pre>
 */

public class NormalStatusBarFragmentModel extends BaseModel {
    @Override
    public void init (IControl control) {

    }

    public String getTitle () {
        return "标题：" + Math.random();
    }

    public int getBgColor () {
        Random random = new Random();
        int r = 0;
        int g = 0;
        int b = 0;
        for (int i = 0; i < 2; i++) {
            //       result=result*10+random.nextInt(10);
            int temp = random.nextInt(16);
            r = r * 16 + temp;
            temp = random.nextInt(16);
            g = g * 16 + temp;
            temp = random.nextInt(16);
            b = b * 16 + temp;
        }
        return Color.rgb(r, g, b);
    }
}
